﻿#ifndef __EQUIPUI_H__
#define __EQUIPUI_H__

#include "cocos2d.h"
#include "Unit.h"
#include "Bag.h"

enum EquipSlotTag
{
	//戒指位置
	SLOT_RING_ZERO = 300,
	SLOT_RING_ONE,
	SLOT_RING_TWO,
	SLOT_RING_THR,
	SLOT_RING_FOR,
	SLOT_RING_FIVE,
	SLOT_NECKLACE_ZERO,
	SLOT_NECKLACE_ONE,
	SLOT_MAIN_HAND,
	SLOT_BELT,
	SLOT_HEAD,
	SLOT_FACE,
	SLOT_EYE,
	SLOT_JACKET,
	SLOT_PANTS,
	SLOT_SHOES,
	SLOT_PACKET,
	SLOT_EAR,
	SLOT_SHOULDER,
	SLOT_WRIST,
	SLOT_ROBOT,
	SLOT_SOURCE,
	SLOT_DADGE_ZERO,
	SLOT_DADGE_ONE,
	SLOT_OFF_HAND,
	SLOT_BACK,
	SLOT_ROBOT_HEART,
};

USING_NS_CC;

class EquipUI :public CCSprite
{
public:
	EquipUI();
	~EquipUI();
	int GetTouchedSlot(Vec2 Ptouch);
	Slot* GetSlot(int Tag);
	void LoadSlotFromDB();
private:
	void InitSlot();
	void LoadItemFromDB();

	std::map<int, Slot*> EquipSlots;
};

#endif